//
//  CXSaveFileToPhone.h
//  aaa
//
//  Created by 季文斌 on 2024/1/5.
//  Copyright © 2024 Alibaba. All rights reserved.
//
//保存下载的文件到手机《文件App目录里》
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface CXSaveFileToPhone : NSObject

///单例初始化
+ (instancetype)sharedManager;

/// 保存文件到手机系统文件app
/// - Parameters:
///   - base64DataSrting: base64文件
///   - headStr: base64文件携带的前缀，有些要去掉
///   - controller: 控制器
- (void)saveFileToPhoneWithBase64DataSrting:(NSString *)base64DataSrting withHeadStr:(NSString*)headStr AndController:(UIViewController *)controller;

/// 保存文件到手机系统文件指定目录《文件APP》
/// - Parameters:
///   - filePathURL: 是AFN下载完成返回的文件路径，例如：/private/var/containers/Bundle/Application/97F74F8B-C481-4894-92F1-B9284BF98E2C/aaa.app/private_hnnx.pdf
///   - controller: 所在控制器
- (void)saveFileToPhoneWithUrl:(NSString *)filePathURL AndController:(UIViewController *)controller;

/// 用手机系统预览文件
/// - Parameters:
///   - filePathURL: 是AFN下载完成返回的文件路径，例如：/private/var/containers/Bundle/Application/97F74F8B-C481-4894-92F1-B9284BF98E2C/aaa.app/private_hnnx.pdf
///   - controller: 所在控制器
- (void)previewWithUrl:(NSString *)filePathURL AndController:(UIViewController *)controller;

@end

NS_ASSUME_NONNULL_END
